﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>用户管理</title>
    <link href="${pageContext.request.contextPath}/css/themes/default/easyui.css" rel="stylesheet" />
	<link href="${pageContext.request.contextPath}/css/themes/icon.css" rel="stylesheet"></link>
    <link href="${pageContext.request.contextPath}/css/themes/color.css" rel="stylesheet" />
    <script src="${pageContext.request.contextPath}/script/jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/script/jquery.easyui.min.js"></script>
    <script src="${pageContext.request.contextPath}/script/wen.js"></script>
    <script src="${pageContext.request.contextPath}/script/easyui-lang-zh_CN.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/pintuer.css">
    <style>
        body {
            font-size: 12px;
            overflow-y: hidden;
        }
         th {
         	font-size: 20px;
         } 
         td {
         	font-size: 18px;
         }  
         .datagrid-header .datagrid-cell span {
		    font-size: 15px;
    		font-weight: 800;
		}
		.datagrid-cell{
   			 font-size: 18px;
   			 font-weight: 300;
		}

    </style>
</head>
<body class="easyui-layout" onload="initContent()">
<div data-options="region:'center'">
<div class="easyui-tabs" data-options="fit:true">
<div title="个人信息" style="padding:10px;">

<!-- <table class="easyui-datagrid" style="width:auto; height: 66%; padding:5px" id="table">
    	    <thead>
    		<tr>
				<th data-options="field:'id'" width="5%" align="center">ID</th>
				<th data-options="field:'username'" width="11%" align="center">用户名</th>
				<th data-options="field:'password'" width="11%" align="center">密码</th>
				<th data-options="field:'telephone'" width="15%" align="center">手机号码</th>
				<th data-options="field:'sex'" width="5%" align="center">性别</th>
				<th data-options="field:'nickname'" width="10%" align="center">真实姓名</th>
				<th data-options="field:'cydz'" width="20%" align="center">常用地址</th>
				<th data-options="field:'time'" width="15%" align="center">创建时间</th>
				<th data-options="field:'cz'" width="6%" align="center">操作</th>
			</tr>
			</thead> 
    </table> -->
    
	<div class="line-big" >
    	<div class="xm3">
        	<div class="panel border-back" style="width: 170px;">
            	<div class="panel-body text-center">
                	<img src="images/face.jpg" width="160" style="margin-left: 1%;margin-top: 1%;"/><br />
                    <div style="margin-left: 35%;font-size: 25px;margin-bottom: 3px;">${u.username}</div>
                </div>
                <div style="text-align:center;font-size: 10px;margin-top: 6px;margin-bottom: 6px;">座右铭:阳光总在风雨后！！！</div>
            </div>
            <br />
        </div>
        <div class="xm9" style="margin-top: 3%;margin-left: 3%;">
            <div class="panel">
            	<div class="panel-head"><strong>个人信息</strong></div>
                <table class="table">
                    <tr>
                    	<td align="right">Id:</td><td>${u.id}</td>
                    	<td align="right">昵称:</td><td>${u.nickname}</td>
                    </tr>
                    <tr>
                    	<td align="right">用户名:</td><td>${u.username}</td>
                    	<td align="right">密码:</td><td>${u.password}</td>
                    </tr>
                    <tr>
                    	<td align="right">手机号码:</td><td>${u.telephone}</td>
                    	<td align="right">性别:</td><td>${u.sex}</td>
                    </tr>
                    <tr>
                    	<td align="right">常用地址:</td><td>${u.cydz}</td>
                    	<td align="right">创建时间:</td><td>${u.time}</td>
                    </tr>
                </table>
                
            </div>
            <a href="${pageContext.request.contextPath}/user/updateuser?id=${u.id}" class="easyui-linkbutton c1" style="width:150px;height: 30px;margin-left: 35%;margin-top: 5%;"><img src="${pageContext.request.contextPath}/images/updateuser.png"/>前往修改个人信息</a>
        </div>
    </div>
</div>	
</div>

 <script>
    	 $(function(){
    		$.ajax({
    			url:"${pageContext.request.contextPath}/user/listuser1",//url:"${pageContext.request.contextPath}/user/listuser",
    			type:"GET",
    			dataType:"json",
    			success:function(data){
    			//alert("ok");
    			for(var i = 0;i<data.length;i++){
  					var obj=data[i];
  					var id=obj.id;
  					var username=obj.username;
  					var password=obj.password;
  					var telephone=obj.telephone;
  					var sex=obj.sex;
  					var nickname=obj.nickname;
  					var cydz=obj.cydz;
  					var time=obj.time;
  					var cz='<a href="${pageContext.request.contextPath}/user/updateuser?id='+data[i].id+'">'+'<img src="${pageContext.request.contextPath}/images/updateuser.png"/>'+'</a>';	
  					$("#table").datagrid("appendRow",{
  						"id":id,
  						"username":username,
  						"password":password,
  						"telephone":telephone,
  						"sex":sex,
  						"nickname":nickname,
  						"cydz":cydz,
  						"time":time,
  						"cz":cz	
  					});
    			}		
    			},
    			error:function(){
    				alert("error");
    			}
    		});
    	}); 
    	
    	 /* $(function(){
    $('#table').datagrid({
        url:"${pageContext.request.contextPath}/user/listusers1",//url:"${pageContext.request.contextPath}/user/listusers",
        rownumbers:true,
        singleSelect:true,
        idField:'id',
        fitColumns : true,
		singleSelect : true,
		rownumbers : true,
		pagination : true,
        pageSize:5,
        pageList:[5,10,15],
        columns:[[  
            {field:'id',title:'ID',width:'5%',align:'center'},
            {field:'username',title:'用户名',width:'11%',align:'center'},
            {field:'password',title:'密码',width:'11%',align:'center'},
            {field:'telephone',title:'手机号码',width:'15%',align:'center'},
            {field:'sex',title:'性别',width:'5%',align:'center'},
            {field:'nickname',title:'真实姓名',width:'10%',align:'center'},
            {field:'cydz',title:'常用地址',width:'20%',align:'center'},
            {field:'time',title:'创建时间',width:'15%',align:'center'},
            {field:'cz',title:'操作',width:'6%',align:'center',
            formatter : function(value, row, index) {
				  var cz = '<a href="${pageContext.request.contextPath}/user/updateuser?id='+row.id+'" name="opera" class="easyui-linkbutton" ><img src="${pageContext.request.contextPath}/images/updateuser.png" class="masterTooltip" title="前往修改用户信息"/></a>'; 
				return cz;
			}
            },
        ]]
    });
});  */
    </script>
</body>
</html>
